<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2019/4/10
 * Time: 15:35
 */

namespace common\sources\write\taskpepperrecord;

use Yii;

class TaskPepperRecordAccess implements ITaskPepperRecordAccess
{
    public function addTaskPepperRecord($param)
    {
        $res = Yii::$app->db->createCommand()->insert('buy_task_pepper_record', [
            'buy_id' => $param['buy_id'],
            'tb_name' => $param['tb_name'],
            'task_order_id' => $param['task_order_id'],
            'task_order_num' => $param['task_order_num'],
            'pepper_income' => $param['pepper_income'],
            'principal' => $param['principal'],
            'remark' => $param['remark'],
            'create_time' => time()
        ])->execute();
        return $res;
    }
}